package cn.gson.springboot.model.mapper;


import java.math.BigDecimal;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.alibaba.fastjson.JSONArray;



@Mapper
public interface OutpatientstorageMapper {

	//显示所有门诊库存药品信息
	public JSONArray selectAllmzkc();
	
	//显示所有门诊发药信息
	public JSONArray selectAllDrugmzfy();
	
	//显示所有住院发药信息
	public JSONArray selectAllDrugzyfy();
	
	//显示所有盘点药品信息
	public JSONArray selectAllpandianxx();
	
	//显示所有新增盘点药品详情信息
	public JSONArray selectAllpandianxzxx();
	
	//查询所有药品,查询药品名称
	public JSONArray selectAllmzkc(@Param("drugname") String drugname);
	
	//显示门诊医疗卡
	public JSONArray selectAllmzylkxs();

	//显示住院医疗卡
	public JSONArray selectAllzyylkxs();	
	
	//显示住院记录详情
	public JSONArray selectAllzyjlxq(@Param("pid") Integer cid);

	//搜索门诊医疗卡信息
	public JSONArray selectAllmzylk(@Param("cliniccardid") Integer cliniccardid);
	
	//搜索住院医疗卡信息
	public JSONArray selectAllzyylk(@Param("cliniccardid") Integer cliniccardid);
	
	//搜索住院信息记录
	public JSONArray selectAllDrugzyfycx(@Param("publicdurgid") Integer publicdurgid);
	
	//显示门诊医疗卡详情药品信息
	public JSONArray selectAllmzylkxq(@Param("cid") Integer cid);
	
	public JSONArray selectAllzyylkxq(@Param("cid") Integer cid);
	
	//显示住院医疗卡详情药品信息
	public JSONArray selectAllDrugzy(@Param("dtype") Integer dtype,@Param("dmoneytype") Integer dmoneytype);
		
	
	//显示请领详情信息
	public JSONArray selectAllqlxq(@Param("drugid") Integer drugid);
	
	//药品药库的新增
	public void addDrugyaokuxz(@Param("drug_number") Integer drugnumber,@Param("outpatient_pici") Integer outpatientpici,
				 				@Param("outpatient_storage_amount") Integer outpatientstorageamount);
	
	//药品的数量增加
	public JSONArray selectAllkucuntj(@Param("outpatientstorageid") Integer outpatientstorageid,@Param("sum") Integer sum);

	//药品药库的新增
	public void addDrugyaozx(@Param("publicdurg_id") Integer publicdurg_id,@Param("publicdurg_shuliang") Integer publicdurgshuliang,@Param("publicdurg_shijishuliang") Integer publicdurgshijishuliang,
							@Param("publicdurg_type") Integer publicdurgtype,@Param("publicdurg_allmoney") BigDecimal publicdurgallmoney,
							@Param("publicdurg_peope") String publicdurgpeope,@Param("publicdurg_lingyaopeople") String publicdurglingyaopeople);
	
}
